package com.classload.mq;

import com.classload.domain.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Service
@RocketMQMessageListener(selectorExpression = "*", topic = "order-topic", consumerGroup = "order-consumer")
@Slf4j
public class RocketMQueneConsumer implements RocketMQListener<User> {


    @Override
    public void onMessage(User user) {
        log.info("我收到订单完成的消息了，开始发送短信{}", user);
    }
}
